package com.wngbms.netty._01simple.client;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

public class ClientInitializerImpl extends ChannelInitializer<SocketChannel> {

    public ClientInitializerImpl() {
        System.out.println(Thread.currentThread().getName() + " ClientInitializerImpl");
    }

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        System.out.println(Thread.currentThread().getName() + "\t" + "SocketChannel: " + ch);
        ch.pipeline().addLast(new ClientHandlerImpl());
    }
}
